<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<body bgcolor="white">

Terms in Narsese, a formal language

<h2>Package Specification</h2>

NARS 4.3 implements the following formal language, Narsese.
<pre>
           &lt;sentence&gt; ::= &lt;judgment&gt;
                        | &lt;question&gt;
                        | &lt;goal&gt;
           &lt;judgment&gt; ::= &lt;statement&gt; &lt;truth-value&gt;
           &lt;question&gt; ::= &lt;statement&gt;
               &lt;goal&gt; ::= &lt;statement&gt; &lt;desire-value&gt;
          &lt;statement&gt; ::= &lt;&lt;term&gt; &lt;relation&gt; &lt;term&gt;&gt;
                        | &lt;compound-statement&gt;
                        | &lt;term&gt;
               &lt;term&gt; ::= &lt;word&gt;
                        | &lt;variable&gt;
                        | &lt;compound-term&gt;
                        | &lt;statement&gt;
           &lt;relation&gt; ::= -->
                        | <->
                        | {--
                        | --]
                        | {-]
                        | ==>
                        | <=>
                        | =/>
                        | =\>
                        | &lt;/>
 &lt;compound-statement&gt; ::= (-- &lt;statement&gt;)
                        | (|| &lt;statement&gt; &lt;statement&gt;<sup>+</sup>)
                        | (&& &lt;statement&gt; &lt;statement&gt;<sup>+</sup>)
                        | (&/ &lt;statement&gt; &lt;statement&gt;<sup>+</sup>)
                        | (/> &lt;statement&gt;)
                        | (\> &lt;statement&gt;)
      &lt;compound-term&gt; ::= {&lt;term&gt;<sup>+</sup>}
                        | [&lt;term&gt;<sup>+</sup>]
                        | (& &lt;term&gt; &lt;term&gt;<sup>+</sup>)
                        | (| &lt;term&gt; &lt;term&gt;<sup>+</sup>)
                        | (- &lt;term&gt; &lt;term&gt;)
                        | (~ &lt;term&gt; &lt;term&gt;)
                        | (* &lt;term&gt; &lt;term&gt;<sup>+</sup>)
                        | (/ &lt;term&gt;<sup>+</sup> _ &lt;term&gt;<sup>*</sup>)
                        | (\ &lt;term&gt;<sup>+</sup> _ &lt;term&gt;<sup>*</sup>)
           &lt;variable&gt; ::= &lt;dependent-var&gt;
                        | &lt;independent-var&gt;
                        | &lt;query-var&gt;
      &lt;dependent-var&gt; ::= #&lt;word&gt;(&lt;independent-var&gt;<sup>*</sup>)
    &lt;independent-var&gt; ::= #&lt;word&gt;
          &lt;query-var&gt; ::= ?&lt;word&gt;
               &lt;word&gt; : string in an alphabet
        &lt;truth-value&gt; : a pair of real numbers in [0, 1] x (0, 1)
       &lt;desire-value&gt; : a pair of real numbers in [0, 1] x (0, 1)
</pre>

Major methods in the term classes:
<ul>
<li>constructors</li>
<li>get and set</li>
<li>clone, compare, and unify</li>
<li>create and access corresponding concept</li>
<li>structural operation in compound</li>
<li>class-specific inference</li>
</ul>

</body>
</html>
